package nameless.aistudy.domain.model.subjects.english.vocabulary.word;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface BookWordRelationRepo extends BaseMapper<BookWordRelation> {

    @Select("SELECT * FROM book_word_relation WHERE book_id = #{bookId} AND word_id = #{wordId}")
    BookWordRelation selectByBookIdAndWordId(
            @Param("bookId") Integer bookId,
            @Param("wordId") Integer wordId
    );
}
